package com.es.service.impl;

import com.es.dao.StudentDao;
import com.es.entity.Student;
import com.es.service.StudentService;

import java.util.List;

public class StudentServiceImpl implements StudentService {

    private StudentDao dao;

    @Override
    public int save(Student student) {
        return dao.save(student);
    }

    @Override
    public int update(Student student) {
        return dao.update(student);
    }

    @Override
    public int delete(Integer id) {
        return dao.delete(id);
    }

    @Override
    public List<Student> list() {
        return dao.list();
    }

    @Override
    public Student get(Integer id) {
        return dao.get(id);
    }

    public StudentDao getDao() {
        return dao;
    }

    public void setDao(StudentDao dao) {
        this.dao = dao;
    }
}
